#include <iostream>
#include "Window.h"
#include "Renderer.h"

using std::cout;
using std::endl;
using namespace Graphics;

int main(const int& argc, const char* args)
{
	Window window = Window(30, 20);
	Renderer renderer = Renderer(&window);

	Pixel pixel = Pixel();
	pixel.Attributes = BACKGROUND_RED | BACKGROUND_INTENSITY;
	pixel.Char.AsciiChar = 'A';

	Pixel clearColor = Pixel();
	clearColor.Attributes = 0x00;
	clearColor.Char.AsciiChar = ' ';

	Sprite sprite(2, 2, 0);
	
	ImageBuffer* buffer = sprite.getData();

	for(int x = 0; x < 2; x++)
		for(int y = 0; y < 2; y++)
			buffer->setData(x, y, pixel);

	sprite.Position = Vector(0, 0);

	while(1)
	{
		renderer.Clear(clearColor);

		renderer.Draw(&sprite);

		window.Present();
	}

	return 0;
}